package io.xccit.system.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.xccit.model.system.SysRole;
import io.xccit.model.vo.SysRoleQueryVo;
import io.xccit.system.mapper.ISysRoleMapper;
import io.xccit.system.service.ISysRoleService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author CH_ywx
 * @date 2023-06-22
 * @description
 */
@Service
public class SysRoleServiceImpl extends ServiceImpl<ISysRoleMapper, SysRole> implements ISysRoleService {

    @Resource
    private ISysRoleMapper sysRoleMapper;

    @Override
    public IPage<SysRole> selectPage(Page<SysRole> sysRolePage, SysRoleQueryVo sysRoleQueryVo) {
/*        LambdaQueryWrapper<SysRole> sysRoleLambdaQueryWrapper = new LambdaQueryWrapper<>();
        sysRoleLambdaQueryWrapper.like(SysRole::getRoleName,sysRoleQueryVo.getRoleName());*/
        return sysRoleMapper.selectPages(sysRolePage,sysRoleQueryVo);
    }

    @Override
    public List<SysRole> selectList() {
        return sysRoleMapper.selectList(null);
    }
}
